<?php
if ($_FILES["qqfile"]["error"] <= 0) {
	
	
	// Start the session
	@session_start();
	
	// Create folder for the session and move file there
	$id = session_id();
	if ($id == "") {
		exit();
	}
	
	$folder = "../upload/" . $id;
	if (!file_exists($folder)) {
 		mkdir($folder);
 	}
	
	$b = move_uploaded_file($_FILES["qqfile"]["tmp_name"], $folder . "/face.jpg");
	
	echo json_encode(array("success" => $b, "userId" => $id));
}

?>